<?php

/*
 * Connect with chats table 
 */

Class Chat extends CActiveRecord {

    /**
     * Returns the static model of the specified AR class.
     * @param string $className active record class name.
     * @return User the static model class
     */
    public static function model($className = __CLASS__) {
	return parent::model($className);
    }

    /**
     * @return string the associated database table name
     */
    public function tableName() {
	return '{{chats}}';
    }

    public function rules() {
	return array(
	    array('chat_id, user_send, user_receive, message, time_created', 'safe')
	);
    }

}

